package com.NxIndustries.Sapphire;

import android.os.Bundle;

import com.NxIndustries.Sapphire.Fragments.About;
import com.NxIndustries.Sapphire.Fragments.About2;
import com.NxIndustries.Sapphire.Fragments.Gestures;
import com.NxIndustries.Sapphire.Fragments.Google;
import com.htc.fragment.widget.CarouselFragment;
import com.htc.fragment.widget.CarouselHost;
import com.htc.fragment.widget.CarouselTabSpec;

public class Carousel extends CarouselFragment {
	
	public Carousel() {
		super(CarouselSettings.AUTHORITY);
		requestCarouselFeature(CarouselFragment.FEATURE_CUSTOM_TITLE);
	}
	

	private void addTabAbout(CarouselHost host, String tag, int str) {
		host.addTab(getActivity(), new CarouselTabSpec(tag, str, About.class.getName()));
	}
	private void addTabAbout2(CarouselHost host, String tag, int str) {
		host.addTab(getActivity(), new CarouselTabSpec(tag, str, About2.class.getName()));
	}
	private void addTabGoogle(CarouselHost host, String tag, int str) {
		host.addTab(getActivity(), new CarouselTabSpec(tag, str, Google.class.getName()));
	}
	private void addTabGesture(CarouselHost host, String tag, int str) {
		host.addTab(getActivity(), new CarouselTabSpec(tag, str, Gestures.class.getName()));
	}
	
	public void enterCarouselEditMode() {
		enterEditMode();
	}
	
public void onActivityCreated(Bundle savedInstanceState) {
	        super.onActivityCreated(savedInstanceState);

	        final CarouselHost host = getCarouselHost();

	        addTabAbout(host, "about", R.string.t_about);
	        addTabAbout2(host, "about2", R.string.t_about2);
	        addTabGoogle(host, "google", R.string.t_google);
	        addTabGesture(host, "gesture", R.string.t_gesture);

		}
}
